import { RouteRecordRaw } from 'vue-router'

/**
 * 为路由添加基座应用的 base_route
 * @param routes
 * @returns
 */
export const addParentBaseRoute = (routes: Array<RouteRecordRaw>) =>
    routes.map((item) => {
        return {
            ...item,
            // path: `${window['__MICRO_APP_BASE_ROUTE__']}${item.path}`
            path: `/${window.__WUJIE.id}${item.path}`
        }
    })
